<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/20
 * Time: 16:07
 */

namespace app\index\model;


use think\Model;

class UserModel extends Model
{
    protected $name = 'user';

    public function phoneVailate($where)
    {
        return $this->where($where)->limit(1)->find();
    }

    public function add($data)
    {
        $this->allowField(true)->save($data);
        return $this->id;
    }
}